import React from 'react'
import { Button } from '@hi-ui/hiui'
import { useTheme } from '../contexts/ThemeContext'

const ThemeToggle = () => {
  const { theme, currentTheme, toggleTheme } = useTheme()
  
  return (
    <Button 
      type="primary" 
      onClick={toggleTheme}
      style={{
        backgroundColor: theme.colors.primary,
        borderColor: theme.colors.primary
      }}
    >
      {currentTheme === 'light' ? '切换到深色主题' : '切换到浅色主题'}
    </Button>
  )
}

export default ThemeToggle